<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'base\IndexController@index')->name('admin.home');
    $router->any('/upload', 'base\IndexController@upload')->name('admin.upload');

    $router->get('/im/{$id}', 'base\ImController@info');
    //获取融云token
    $router->post('/im/getToken', 'base\ImController@getToken');

    $router->resource('users', user\UserController::class);

    //参数配置
    $router->resource('configs', config\ConfigsController::class);
    $router->resource('config-cates', config\ConfigCateController::class);

    //轮播图
    $router->resource('banners', banner\BannerController::class);
    $router->resource('banner-cates', banner\BannerCateController::class);

    //充值配置
    $router->resource('recharge-configs', funds\RechargeConfigController::class);

    //充值记录
    $router->resource('recharges', funds\RechargeController::class);

    $router->resource('goods-cates', goods\GoodsCateController::class);

    $router->resource('goods', goods\GoodsController::class);
    $router->resource('exchange', goods\ExchangeController::class);
    $router->any('getCate', 'goods\GoodsController@getCate');

    $router->resource('error-logs', log\ErrorLogController::class);

    $router->resource('addresses', user\AddressController::class);

    $router->resource('orders', goods\OrderController::class);
    $router->post('/orderPass', 'goods\OrderController@orderPass')->name('admin.orderPass');
    $router->resource('vouchers', coupon\VoucherController::class);

    $router->resource('rebates', funds\RebateController::class);

    $router->resource('coupons', coupon\CouponController::class);

    $router->resource('shops', shop\ShopController::class);

    //提现申请列表
    $router->resource('cashes', funds\CashController::class);

    $router->resource('feedback', user\FeedBackController::class);

    $router->resource('posts-cates', posts\PostsCateController::class);

    $router->resource('posts', posts\PostsController::class);
    $router->resource('news', news\NewsController::class);
    $router->resource('news-cates', news\NewsCateController::class);
    $router->resource('notice', news\NoticeController::class);
    $router->resource('access-vote', access\AccessVoteController::class);
    $router->resource('access-log', access\AccessLogController::class);
    $router->resource('access-leader', access\AccessVoteLeaderController::class);
    $router->resource('access-member', access\AccessVoteMemberController::class);
    $router->resource('getOtherLeader', 'access\AccessVoteController@getOtherLeader');

    $router->resource('user-checks', user\UserCheckController::class);
    $router->any('access-exports', 'access\AccessLogController@exports');

    $router->resource('exam', exam\ExamController::class);
    $router->resource('question', exam\QuestionController::class);
    $router->resource('exam-question', exam\ExamQuestionController::class);
    $router->resource('user-exam', exam\UserExamController::class);


    $router->resource('activity', activity\ActivityController::class);
    $router->resource('activity-admin', activity\ActivityAdminController::class);
});



